import React from 'react';
import {Dimensions} from 'react-native';

import Pie from './charts/Pie';
import Theme from './theme/index';

const {width, height} = Dimensions.get('window');


export default class AnimatePie extends React.Component {

  static defaultProps = {
    data: [
      {"number": 8, "name": '娱乐活动'},
      {"number": 7, "name": '宠物'},
      {"number": 16, "name": '食物'},
      {"number": 23, "name": '汽车'},
      {"number": 42, "name": '其他'},
      {"number": 4, "name": '音乐'},
    ]
  }

  state = {
    data: this.props.data,
  }


  render() {
    return (
      <Pie
        pieWidth={150}
        pieHeight={150}
        colors={Theme.colors}
        width={width}
        height={height}
        data={this.state.data}/>
    )
  }
}